<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:c="http://java.sun.com/jstl/core"
	xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core"
	xmlns:rich="http://richfaces.ajax4jsf.org/rich"
	xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
	xmlns:t="https://code.google.com/p/rad-framework/taglib"
	xmlns:tt="https://code.google.com/p/rad-framework"
	xmlns:s="http://jboss.com/products/seam/taglib">
	
	<tt:toggle-popup id="importToggle" rendered="#{renderImport and s:hasRole('Admin')}">
		<ui:define name="closed">

			<rich:toggleControl for="importToggle" styleClass="rad-framework-action-panel">
				<h:outputText styleClass="rad-framework-action-import" value="#{messages['Import']}"
					title="#{messages['ImportDoc']}" />
			</rich:toggleControl>

		</ui:define>
		<ui:define name="open">

			<t:fieldset legend="Import">
				<h:panelGrid>
				
					<s:fileUpload id="importUpload" data="#{finder.importData}"
						accept="text/xml"/>
					
					<h:panelGroup>
						<h:commandLink id="importBtn"
							action="#{finder.doImport}"
							styleClass="rad-framework-button-content">
							<span><h:outputText value="#{messages['OK']}" /></span>
						</h:commandLink>
						<rich:toggleControl for="importToggle" value="#{messages['Hide']}"/>
					</h:panelGroup>
				
				</h:panelGrid>
			</t:fieldset>

		</ui:define>
	</tt:toggle-popup>
	
</ui:composition>